#ifndef GEOMETRY_H_
#define GEOMETRY_H_

#define MATH_PIDIV180 		0.01745329251994329576923690768489
#define MATH_DEGREESTORAD 	0.0174532930
#define MATH_PI				3.141592653589

typedef struct {
	int x;
	int y;
} Point;

typedef struct {
	Point p1;
	Point p2;
} Rect, Line;

typedef struct {
	Point p1;
	Point p2;
	Point p3;
} Triangle;

typedef struct {
	int x;
	int y;
	int z;
} Point3D;

typedef struct {
	Point3D p1;
	Point3D p2;
} Line3D;

typedef struct {
	Point center;
	unsigned char radius;
} Circle;

void createRectangle(Rect *r, unsigned char x, unsigned char y,
		unsigned char w, unsigned char h);
void createCircle(Circle *c, unsigned char x, unsigned char y,
		unsigned char rad);
void createTriangle(Triangle *t, unsigned char x1, unsigned char y1,
		unsigned char x2, unsigned char y2, unsigned char x3, unsigned char y3);
#endif /*GEOMETRY_H_*/
